package com.lsz.flight_system.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

//航班信息实体类
@Data
@NoArgsConstructor
@Entity
@Table(name = "plane_message")
public class PlaneMessage {
    @Id
    @Column(name = "plane_id")
    private String planeId;

    @Column(name = "origin")
    private String origin;//出发地

    @Column(name = "destination")
    private String destination;//目的地

    @Column(name = "start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private LocalDateTime startTime;//出发时间

    @Column(name = "arrive_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private LocalDateTime arriveTime;//到达时间

    @Column(name = "seats")
    private int seats;//飞机座位数

    @Column(name = "remain_ticket")
    private int remainTicket;//剩余票数

    @Column(name = "ticket_price")
    private float ticketPrice;//票价

    @Column(name = "plane_state")
    private String planeState;//飞机状态

    @Column(name = "plane_route")
    private String planeRoute;
}
